<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改卡口信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-bayonet-edit" th:object="${bayonet}">
            <input name="bayonetId" th:field="*{bayonetId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-4 control-label">卡口编号：</label>
                <div class="col-sm-8">
                    <input name="bayonetNum" th:field="*{bayonetNum}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-4 control-label is-required">卡口名称：</label>
                <div class="col-sm-8">
                    <textarea name="bayonetName" class="form-control" required>[[*{bayonetName}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-4 control-label">所属行政区划：</label>
                <div class="col-sm-8">
                    <input name="xzqh" th:field="*{xzqh}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-4 control-label">卡口类型：</label>
                <div class="col-sm-8">
                    <select name="bayonetType" class="form-control m-b" th:with="type=${@dict.getType('bayonet_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{bayonetType}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-4 control-label">车道数：</label>
                <div class="col-sm-8">
                    <input name="lanesNum" th:field="*{lanesNum}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-4 control-label">卡口所在地管辖派出所代码：</label>
                <div class="col-sm-8">
                    <input name="bayonetSuozaiNum" th:field="*{bayonetSuozaiNum}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-4 control-label">卡口所在地管辖派出所名称：</label>
                <div class="col-sm-7">
                    <input name="bayonetSuozaiName" th:field="*{bayonetSuozaiName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-4 control-label">车道方向：</label>
                <div class="col-sm-7">
                    <select name="lanesDir" class="form-control m-b" th:with="type=${@dict.getType('lanes_dir')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{lanesDir}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-4 control-label">警用地理信息横坐标X：</label>
                <div class="col-sm-7">
                    <input name="bayonetX" th:field="*{bayonetX}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-4 control-label">警用地理信息纵坐标Y：</label>
                <div class="col-sm-7">
                    <input name="bayonetY" th:field="*{bayonetY}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-4 control-label">卡口详细地址：</label>
                <div class="col-sm-7">
                    <input name="bayonetDetail" th:field="*{bayonetDetail}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-4 control-label">备注：</label>
                <div class="col-sm-7">
                    <textarea name="remark" class="form-control">[[*{remark}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-4 control-label">卡口状态：</label>
                <div class="col-sm-7">
                    <select name="bayonetState" class="form-control m-b" th:with="type=${@dict.getType('bayonet_state')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{bayonetState}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "bayonet/bayonet";
        $("#form-bayonet-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-bayonet-edit').serialize());
            }
        }
    </script>
</body>
</html>